<?php

namespace App\DTO;

/**
 * Represents an airport with various related attributes.
 */
readonly class Airport
{
    /**
     * @param string|null $code The airport's code.
     * @param array|null $cityName The names of the city in various languages.
     * @param string|null $country The country where the airport is located.
     * @param string|null $area The area where the airport is located.
     * @param string|null $timezone The timezone of the airport.
     * @param float|null $lat The latitude of the airport's location.
     * @param float|null $lng The longitude of the airport's location.
     */
    public function __construct(
        private ?string $code,
        private ?array $cityName,
        private ?string $country,
        private ?string $area,
        private ?string $timezone,
        private ?float $lat,
        private ?float $lng
    ) {
    }

    /**
     * Get the airport's code.
     *
     * @return string|null
     */
    public function getCode(): ?string
    {
        return $this->code;
    }

    /**
     * Get the city's name in various languages.
     *
     * @return array|null
     */
    public function getCityName(): ?array
    {
        return $this->cityName;
    }

    /**
     * Get the country where the airport is located.
     *
     * @return string|null
     */
    public function getCountry(): ?string
    {
        return $this->country;
    }

    /**
     * Get the area where the airport is located.
     *
     * @return string|null
     */
    public function getArea(): ?string
    {
        return $this->area;
    }

    /**
     * Get the timezone of the airport.
     *
     * @return string|null
     */
    public function getTimezone(): ?string
    {
        return $this->timezone;
    }

    /**
     * Get the latitude of the airport's location.
     *
     * @return float|null
     */
    public function getLat(): ?float
    {
        return $this->lat;
    }

    /**
     * Get the longitude of the airport's location.
     *
     * @return float|null
     */
    public function getLng(): ?float
    {
        return $this->lng;
    }
}
